package com.lantosec.hmrp.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.system.vo.SysUreportVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * UReport定义 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysUreport extends BaseEntity<SysUreportVO> {

    private static final long serialVersionUID = 1L;

    public SysUreport(SysUreportVO vo) {
        this.ureportId = vo.getUreportId();
        this.ureportType = vo.getUreportType();
        this.ureportName = vo.getUreportName();
        this.downloadName = vo.getDownloadName();
        this.ureportContent = vo.getUreportContent();
        this.updateDate = vo.getUpdateDate();
    }

    @Override
    public SysUreportVO convertToVO() {
        return new SysUreportVO(this);
    }


    /**
     * ID
     */
    @TableId(value = "ureport_id", type = IdType.AUTO)
    private Integer ureportId;

    /**
     * 类型(1流程)
     */
    private Integer ureportType;

    /**
     * 报表名称
     */
    private String ureportName;

    /**
     * 下载文件名称
     */
    private String downloadName;

    /**
     * 报表内容
     */
    private String ureportContent;

    /**
     * 最后更新时间
     */
    private Date updateDate;

    /**
     * 逻辑删除标识
     */
    private Integer flag;

    public enum ColName {
        ureport_id, ureport_type, ureport_name, download_name, ureport_content, update_date, flag,
    }
}
